package com.ctshk.rpc.train.service;


import com.ctshk.common.dto.Result;
import com.ctshk.common.model.PageResponse;
import com.ctshk.common.model.TokenUser;
import com.ctshk.rpc.train.dto.TrainNumberConditionListDTO;
import com.ctshk.rpc.train.dto.TrainNumberDTO;
import com.ctshk.rpc.train.dto.TrainNumberListDTO;
import com.ctshk.rpc.train.dto.TrainStopStationDTO;
import com.ctshk.rpc.train.dto.es.TrainNumberCacheDTO;
import com.ctshk.rpc.train.req.TrainNumberPageReq;
import com.ctshk.rpc.train.req.TrainNumberQueryReq;
import com.ctshk.rpc.train.req.TrainNumberReq;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 火车车次表 服务类
 * </p>
 *
 * @author 彭柳霖
 * @since 2021-03-10
 */
public interface ITrainNumberService{

    /**
     * 火车车次列表
     * @param busLineListReq
     * @return
     */
    PageResponse<TrainNumberListDTO> queyList(TrainNumberPageReq busLineListReq);


    /**
     * 新增火车车次信息
     * @param trainNumberReq
     * @param user
     */
    Result saveTrainNumber(TrainNumberReq trainNumberReq, TokenUser user);


    /**
     * 修改火车车次信息
     * @param trainNumberReq
     * @param user
     */
    Result updateTrainNumber(TrainNumberReq trainNumberReq, TokenUser user);


    /**
     * 查询火车车次信息
     * @param id
     * @return
     */
    TrainNumberDTO queryDetail(Long id);


    /**
     * 火车车次有效无效设置
     * @param id
     */
    Result isValid(long id,TokenUser user);



    /**
     * 根据铁路公司查询火车车次信息
     * @param trainNumberQueryReq
     * @return
     */
    List<TrainNumberDTO> queryTrainNumber(TrainNumberQueryReq trainNumberQueryReq);

    /**
     * 根据车次id查询火车经停站信息
     * @param trainId
     * @return
     */
    List<TrainStopStationDTO> queryStopStaionByTrainId(Long trainId);

    PageResponse<TrainNumberConditionListDTO> queryTrainNumberConditionList(TrainNumberPageReq req);

    List<TrainNumberCacheDTO> findTrainNumberList(List<Long> ids, LocalDateTime now);
}
